﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace BitcoinMarket.ViewModels
{
    public class AppSettingsViewModel : INotifyPropertyChanged
    {
        private ObservableCollection<AppSettingsNetworkStatusItemsViewModel> _NetworkStatusChartItems;

        private ObservableCollection<AppSettingsCurrencyViewModel> _CurrenciesItems;

        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public ObservableCollection<AppSettingsNetworkStatusItemsViewModel> NetworkStatusChartItems
        {
            get
            {
                return _NetworkStatusChartItems;
            }
            set
            {
                if (value != _NetworkStatusChartItems)
                {
                    _NetworkStatusChartItems = value;
                    NotifyPropertyChanged("NetworkStatusChartItems");
                }
            }
        }

        public ObservableCollection<AppSettingsCurrencyViewModel> CurrenciesItems
        {
            get
            {
                return _CurrenciesItems;
            }
            set
            {
                if (value != _CurrenciesItems)
                {
                    _CurrenciesItems = value;
                    NotifyPropertyChanged("CurrenciesItems");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
